Integrand size = 23, antiderivative size = 76 \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {(a+b) (a+3 b) \cot (e+f x)}{f}-\frac {(a+b)^2 \cot ^3(e+f x)}{3 f}+\frac {b (2 a+3 b) \tan (e+f x)}{f}+\frac {b^2 \tan ^3(e+f x)}{3 f} \]
-(a+b)*(a+3*b)*cot(f*x+e)/f-1/3*(a+b)^2*cot(f*x+e)^3/f+b*(2*a+3*b)*tan(f*x +e)/f+1/3*b^2*tan(f*x+e)^3/f
Time = 5.18 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.99 \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {\csc (2 e) \csc ^3(2 (e+f x)) \left (8 a (a+2 b) \sin (2 e)-6 (a+2 b)^2 \sin (2 f x)-3 a^2 \sin (2 (e+f x))-6 a b \sin (2 (e+f x))+a^2 \sin (6 (e+f x))+2 a b \sin (6 (e+f x))+3 a^2 \sin (4 e+2 f x)+a^2 \sin (4 e+6 f x)+8 a b \sin (4 e+6 f x)+8 b^2 \sin (4 e+6 f x)\right )}{6 f} \]
-1/6*(Csc[2*e]*Csc[2*(e + f*x)]^3*(8*a*(a + 2*b)*Sin[2*e] - 6*(a + 2*b)^2* Sin[2*f*x] - 3*a^2*Sin[2*(e + f*x)] - 6*a*b*Sin[2*(e + f*x)] + a^2*Sin[6*( e + f*x)] + 2*a*b*Sin[6*(e + f*x)] + 3*a^2*Sin[4*e + 2*f*x] + a^2*Sin[4*e + 6*f*x] + 8*a*b*Sin[4*e + 6*f*x] + 8*b^2*Sin[4*e + 6*f*x]))/f
Time = 0.26 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.89, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.174, Rules used = {3042, 4620, 355, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\left (a+b \sec (e+f x)^2\right )^2}{\sin (e+f x)^4}dx\) |
\(\Big \downarrow \) 4620 |
\(\displaystyle \frac {\int \cot ^4(e+f x) \left (\tan ^2(e+f x)+1\right ) \left (b \tan ^2(e+f x)+a+b\right )^2d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 355 |
\(\displaystyle \frac {\int \left ((a+b)^2 \cot ^4(e+f x)+(a+b) (a+3 b) \cot ^2(e+f x)+b^2 \tan ^2(e+f x)+b (2 a+3 b)\right )d\tan (e+f x)}{f}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {b (2 a+3 b) \tan (e+f x)-\frac {1}{3} (a+b)^2 \cot ^3(e+f x)-(a+b) (a+3 b) \cot (e+f x)+\frac {1}{3} b^2 \tan ^3(e+f x)}{f}\) |
(-((a + b)*(a + 3*b)*Cot[e + f*x]) - ((a + b)^2*Cot[e + f*x]^3)/3 + b*(2*a + 3*b)*Tan[e + f*x] + (b^2*Tan[e + f*x]^3)/3)/f
3.1.26.3.1 Defintions of rubi rules used
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q _.), x_Symbol] :> Int[ExpandIntegrand[(e*x)^m*(a + b*x^2)^p*(c + d*x^2)^q, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b*c - a*d, 0] && IGtQ[p, 0] & & IGtQ[q, 0]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_), x_Symbol] :> With[{ff = FreeFactors[Tan[e + f*x], x]}, Simp[ff^(m + 1)/f Subst[Int[x^m*(ExpandToSum[a + b*(1 + ff^2*x^2)^(n/2), x]^p/(1 + f f^2*x^2)^(m/2 + 1)), x], x, Tan[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f, p}, x] && IntegerQ[m/2] && IntegerQ[n/2]
Result contains complex when optimal does not.
Time = 0.29 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.71
method | result | size |
risch | \(\frac {4 i \left (3 a^{2} {\mathrm e}^{8 i \left (f x +e \right )}+8 a^{2} {\mathrm e}^{6 i \left (f x +e \right )}+16 a b \,{\mathrm e}^{6 i \left (f x +e \right )}+6 a^{2} {\mathrm e}^{4 i \left (f x +e \right )}+24 a b \,{\mathrm e}^{4 i \left (f x +e \right )}+24 b^{2} {\mathrm e}^{4 i \left (f x +e \right )}-a^{2}-8 a b -8 b^{2}\right )}{3 f \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )^{3} \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right )^{3}}\) | \(130\) |
parallelrisch | \(-\frac {\left (9 \cos \left (2 f x +2 e \right ) a^{2}+24 \cos \left (2 f x +2 e \right ) a b +24 \cos \left (2 f x +2 e \right ) b^{2}-a^{2} \cos \left (6 f x +6 e \right )-8 a b \cos \left (6 f x +6 e \right )-8 b^{2} \cos \left (6 f x +6 e \right )+8 a^{2}+16 a b \right ) \sec \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} \csc \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{96 f \left (\cos \left (3 f x +3 e \right )+3 \cos \left (f x +e \right )\right )}\) | \(140\) |
derivativedivides | \(\frac {a^{2} \left (-\frac {2}{3}-\frac {\csc \left (f x +e \right )^{2}}{3}\right ) \cot \left (f x +e \right )+2 a b \left (-\frac {1}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {4}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {8 \cot \left (f x +e \right )}{3}\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )^{3}}-\frac {2}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {8}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {16 \cot \left (f x +e \right )}{3}\right )}{f}\) | \(144\) |
default | \(\frac {a^{2} \left (-\frac {2}{3}-\frac {\csc \left (f x +e \right )^{2}}{3}\right ) \cot \left (f x +e \right )+2 a b \left (-\frac {1}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {4}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {8 \cot \left (f x +e \right )}{3}\right )+b^{2} \left (\frac {1}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )^{3}}-\frac {2}{3 \sin \left (f x +e \right )^{3} \cos \left (f x +e \right )}+\frac {8}{3 \sin \left (f x +e \right ) \cos \left (f x +e \right )}-\frac {16 \cot \left (f x +e \right )}{3}\right )}{f}\) | \(144\) |
norman | \(\frac {\frac {a^{2}+2 a b +b^{2}}{24 f}+\frac {\left (a^{2}+2 a b +b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{12}}{24 f}+\frac {\left (a^{2}+6 a b +5 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{4 f}+\frac {\left (a^{2}+6 a b +5 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{10}}{4 f}-\frac {\left (11 a^{2}+86 a b +91 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{8 f}-\frac {\left (11 a^{2}+86 a b +91 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{8 f}+\frac {\left (13 a^{2}+110 a b +105 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{6 f}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right )^{3}}\) | \(223\) |
4/3*I*(3*a^2*exp(8*I*(f*x+e))+8*a^2*exp(6*I*(f*x+e))+16*a*b*exp(6*I*(f*x+e ))+6*a^2*exp(4*I*(f*x+e))+24*a*b*exp(4*I*(f*x+e))+24*b^2*exp(4*I*(f*x+e))- a^2-8*a*b-8*b^2)/f/(exp(2*I*(f*x+e))-1)^3/(exp(2*I*(f*x+e))+1)^3
Time = 0.24 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.33 \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=-\frac {2 \, {\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{6} - 3 \, {\left (a^{2} + 8 \, a b + 8 \, b^{2}\right )} \cos \left (f x + e\right )^{4} + 6 \, {\left (a b + b^{2}\right )} \cos \left (f x + e\right )^{2} + b^{2}}{3 \, {\left (f \cos \left (f x + e\right )^{5} - f \cos \left (f x + e\right )^{3}\right )} \sin \left (f x + e\right )} \]
-1/3*(2*(a^2 + 8*a*b + 8*b^2)*cos(f*x + e)^6 - 3*(a^2 + 8*a*b + 8*b^2)*cos (f*x + e)^4 + 6*(a*b + b^2)*cos(f*x + e)^2 + b^2)/((f*cos(f*x + e)^5 - f*c os(f*x + e)^3)*sin(f*x + e))
Timed out. \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\text {Timed out} \]
Time = 0.18 (sec) , antiderivative size = 80, normalized size of antiderivative = 1.05 \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {b^{2} \tan \left (f x + e\right )^{3} + 3 \, {\left (2 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right ) - \frac {3 \, {\left (a^{2} + 4 \, a b + 3 \, b^{2}\right )} \tan \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}}{\tan \left (f x + e\right )^{3}}}{3 \, f} \]
1/3*(b^2*tan(f*x + e)^3 + 3*(2*a*b + 3*b^2)*tan(f*x + e) - (3*(a^2 + 4*a*b + 3*b^2)*tan(f*x + e)^2 + a^2 + 2*a*b + b^2)/tan(f*x + e)^3)/f
Time = 0.34 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.29 \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {b^{2} \tan \left (f x + e\right )^{3} + 6 \, a b \tan \left (f x + e\right ) + 9 \, b^{2} \tan \left (f x + e\right ) - \frac {3 \, a^{2} \tan \left (f x + e\right )^{2} + 12 \, a b \tan \left (f x + e\right )^{2} + 9 \, b^{2} \tan \left (f x + e\right )^{2} + a^{2} + 2 \, a b + b^{2}}{\tan \left (f x + e\right )^{3}}}{3 \, f} \]
1/3*(b^2*tan(f*x + e)^3 + 6*a*b*tan(f*x + e) + 9*b^2*tan(f*x + e) - (3*a^2 *tan(f*x + e)^2 + 12*a*b*tan(f*x + e)^2 + 9*b^2*tan(f*x + e)^2 + a^2 + 2*a *b + b^2)/tan(f*x + e)^3)/f
Time = 18.49 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.12 \[ \int \csc ^4(e+f x) \left (a+b \sec ^2(e+f x)\right )^2 \, dx=\frac {b^2\,{\mathrm {tan}\left (e+f\,x\right )}^3}{3\,f}-\frac {\frac {2\,a\,b}{3}+{\mathrm {tan}\left (e+f\,x\right )}^2\,\left (a^2+4\,a\,b+3\,b^2\right )+\frac {a^2}{3}+\frac {b^2}{3}}{f\,{\mathrm {tan}\left (e+f\,x\right )}^3}+\frac {b\,\mathrm {tan}\left (e+f\,x\right )\,\left (2\,a+3\,b\right )}{f} \]